define('Router', [
  'jquery',
  'underscore',
  'backbone',
  'HomeView'
], function ($, _, Backbone, HomeView) {
  return Backbone.Router.extend({
    routes: {
      '': 'home',
      'home': 'home',
      // any other action defaults to the following handler
      '*actions': 'defaultAction'
    },
    initialize: function () {
      this.elms = {
        'page-content': $('.page-content')
      };
    },

    home: function () {
      if (!this.homeView) {
        this.homeView = new HomeView();
      }
      this.elms['page-content'].html(this.homeView.render().el);
    }
  });
});
